Release GtkApplication earlier
authorMatthias Clasen <mclasen@redhat.com>
Mon, 3 Jan 2011 18:11:55 +0000 (13:11 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 3 Jan 2011 18:11:55 +0000 (13:11 -0500)
GtkWindow was only releasing the application in finalize, causing
problems for language bindings. Now we release it already in destroy
(and then again in finalize for good measure).

https://bugzilla.gnome.org/show_bug.cgi?id=638580

gtk/gtkwindow.c

index 78a2a62bf5c930ca3ed32d750611a6b3bfe180f6..a81ac65a88dacf0e31e2f473a2796fe57e92b2e9 100644 (file)
@@ -4513,6 +4513,8 @@ gtk_window_destroy (GtkWidget *widget)
   GtkWindow *window = GTK_WINDOW (widget);
   GtkWindowPrivate *priv = window->priv;
 
+  gtk_window_release_application (window);
+
   toplevel_list = g_slist_remove (toplevel_list, window);
 
   if (priv->transient_parent)
@@ -4520,7 +4522,7 @@ gtk_window_destroy (GtkWidget *widget)
 
   /* frees the icons */
   gtk_window_set_icon_list (window, NULL);
-  
+
   if (priv->has_user_ref_count)
     {
       priv->has_user_ref_count = FALSE;